home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / powerup / ppcpragmas / potgo_pragmas.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  2KB  |  84 lines

  1. /* Automatically generated header! Do not edit! */
  2.  
  3. #ifndef _PPCPRAGMA_POTGO_H
  4. #define _PPCPRAGMA_POTGO_H
  5. #ifdef __GNUC__
  6. #ifndef _PPCINLINE__POTGO_H
  7. #include <powerup/ppcinline/potgo.h>
  8. #endif
  9. #else
  10.  
  11. #ifndef POWERUP_PPCLIB_INTERFACE_H
  12. #include <powerup/ppclib/interface.h>
  13. #endif
  14.  
  15. #ifndef POWERUP_GCCLIB_PROTOS_H
  16. #include <powerup/gcclib/powerup_protos.h>
  17. #endif
  18.  
  19. #ifndef NO_PPCINLINE_STDARG
  20. #define NO_PPCINLINE_STDARG
  21. #endif/* SAS C PPC inlines */
  22.  
  23. #ifndef POTGO_BASE_NAME
  24. #define POTGO_BASE_NAME PotgoBase
  25. #endif /* !POTGO_BASE_NAME */
  26.  
  27. #define    AllocPotBits(bits)    _AllocPotBits(POTGO_BASE_NAME, bits)
  28.  
  29. static __inline UWORD
  30. _AllocPotBits(void *PotgoBase, unsigned long bits)
  31. {
  32. struct Caos    MyCaos;
  33.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  34. //    MyCaos.M68kStart    =    NULL;
  35. //    MyCaos.M68kSize        =    0;
  36.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  37. //    MyCaos.PPCStart        =    NULL;
  38. //    MyCaos.PPCSize        =    0;
  39.     MyCaos.d0        =(ULONG) bits;
  40.     MyCaos.caos_Un.Offset    =    (-6);
  41.     MyCaos.a6        =(ULONG) PotgoBase;    
  42.     return((UWORD)PPCCallOS(&MyCaos));
  43. }
  44.  
  45. #define    FreePotBits(bits)    _FreePotBits(POTGO_BASE_NAME, bits)
  46.  
  47. static __inline void
  48. _FreePotBits(void *PotgoBase, unsigned long bits)
  49. {
  50. struct Caos    MyCaos;
  51.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  52. //    MyCaos.M68kStart    =    NULL;
  53. //    MyCaos.M68kSize        =    0;
  54.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  55. //    MyCaos.PPCStart        =    NULL;
  56. //    MyCaos.PPCSize        =    0;
  57.     MyCaos.d0        =(ULONG) bits;
  58.     MyCaos.caos_Un.Offset    =    (-12);
  59.     MyCaos.a6        =(ULONG) PotgoBase;    
  60.     PPCCallOS(&MyCaos);
  61. }
  62.  
  63. #define    WritePotgo(word, mask)    _WritePotgo(POTGO_BASE_NAME, word, mask)
  64.  
  65. static __inline void
  66. _WritePotgo(void *PotgoBase, unsigned long word, unsigned long mask)
  67. {
  68. struct Caos    MyCaos;
  69.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  70. //    MyCaos.M68kStart    =    NULL;
  71. //    MyCaos.M68kSize        =    0;
  72.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  73. //    MyCaos.PPCStart        =    NULL;
  74. //    MyCaos.PPCSize        =    0;
  75.     MyCaos.d0        =(ULONG) word;
  76.     MyCaos.d1        =(ULONG) mask;
  77.     MyCaos.caos_Un.Offset    =    (-18);
  78.     MyCaos.a6        =(ULONG) PotgoBase;    
  79.     PPCCallOS(&MyCaos);
  80. }
  81.  
  82. #endif /* SASC Pragmas */
  83. #endif /* !_PPCPRAGMA_POTGO_H */
  84.